cmake_minimum_required(VERSION 3.0.2)
project(cloud_process)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Release)
set(CUSTOM_MSGS detect_msgs)
add_definitions(-w)

find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  message_filters
  pcl_conversions
  pcl_ros
  roscpp
  rospy
  sensor_msgs
  detect_msgs
)

catkin_package()


include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${catkin_INCLUDE_DIRS})

add_executable(pub_box_node src/pub_box.cc src/pub_box_node.cc)
add_dependencies(pub_box_node ${CUSTOM_MSGS}_generate_messages_cpp)
target_link_libraries(pub_box_node ${catkin_LIBRARIES})

# eigen3
include_directories(/usr/local/include/eigen3)

# opencv
#-------------nano-------------
# set(OpenCV_DIR /home/agilex/software/opencv-3.4.16/build)

# set(OpenCV_DIR /home/lin/software/opencv-4.6.0/build)
find_package(OpenCV 3.0 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

# pcl
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})

add_executable(box2rgb_node src/box2rgb.cc src/box2rgb_node.cc)
add_dependencies(box2rgb_node ${CUSTOM_MSGS}_generate_messages_cpp)
target_link_libraries(box2rgb_node ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${PCL_LIBRARIES})

message("\n---------------\n")
message(${CUSTOM_MSGS})
MESSAGE("\n------------\n\n----OPENCV VERSION: " ${OpenCV_VERSION})
MESSAGE("----PCL VERSION: " ${PCL_VERSION})
MESSAGE("----CUDA VERSION: " ${CUDA_VERSION})
MESSAGE("----TensorRT VERSION: " ${TensorRT_FOUND})
message("\n---------------\n")